import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import { store } from '@/redux/index';
import { Provider } from 'react-redux';
//国际化
import { ConfigProvider } from 'antd';
import zhCN from 'antd/locale/zh_CN';

import '@/styles/global.less';
import '@/styles/reset.less';
import App from './App';
import ErrorBoundary from './common_components/ErrorBoundary';

const root = ReactDOM.createRoot(document.getElementById('root')!);
root.render(
  <Provider store={store}>
    <BrowserRouter>
      <ErrorBoundary>
        <ConfigProvider locale={zhCN}>
          <App />
        </ConfigProvider>
      </ErrorBoundary>
    </BrowserRouter>
  </Provider>,
);
